package byggeTegning.husGeometri;

import javax.media.j3d.Appearance;
import javax.media.j3d.Group;
import javax.media.j3d.Shape3D;
import javax.vecmath.Color3f;

import byggeTegning.geometry.Cube;
import byggeTegning.geometry.Object3D;
import byggeTegning.geometry.Point3D;
import byggeTegning.geometry.TransformedGroup3D;


// ***************************************************************************
// *** CLASS: BjelkeLag
// ***************************************************************************
public class BjelkeLag extends Block
{ 
  public BjelkeLag(String ident,Point3D p0,double width,double height,double depth)
  { super(ident,p0,width,height,depth); }

  
  // ***************************************************************************
  // *** METHOD: getModel3D -- SENERE !!!!
  // ***************************************************************************
  public /*abstract*/ Group getModel3D(Color3f c)
  { TransformedGroup3D tg=new TransformedGroup3D();
    tg.setSize(width,height,depth);
    tg.setP0(p0.x,p0.y,p0.z);
//    tg.setAngles(new Vector3d(1.0,0.0,0.0));
//    tg.setAngleX(Math.PI/2);  
//    tg.setAngleY(Math.PI/2);  
//    tg.setAngleZ(Math.PI/2);  
    Shape3D shape=new Cube();
    Appearance app=Object3D.createAppearance(8,c);
    shape.setAppearance(app);
    tg.addChild(shape);
    return(tg);
  }  
}  
